
<?php include('common/header.php') ?>

<script>
	
</script>

<table cellpadding="5" cellspacing="15" class="list_search" align="center">

<?php $index = 1 ?>
<?php foreach ($data as  $item ){?>
	<?php  if ($index == 1 ){?>
	<tr>
		<td align="center" > 
			<div   class= "div_list_image"  >			
				<img class="img_list"  onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')" id="img_small_<?php echo $item -> id ?>" src="<?php echo base_url('/assets/image/aodai/'.($item -> id %10)."/".$item->image); ?>"></img>
				<div><?php  echo preg_replace("/^(\d+)(\d\d\d)/i", "$1,$2", $item -> price);  ?> <span class="money">VNĐ</span></div>
				<div style="margin-bottom:5px;"><span class="button" onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')"><?php echo lang('view_detail')?></span><span class="button" onclick="redirect_page('<?php echo base_url('user/giohang')."?ma_aodai=" . $item->id ."&giatien=".$item->price?>')" ><?php echo lang('buy')?></span></div>
				<div style="padding-left:40px;"><fb:like href="<?php echo base_url('product/view/').$item -> id ?>" layout='button_count' send='false' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like></div>
			</div>	
			 
		</td>	
		<?php $index = $index + 1 ;?>
	<?php }else if ($index == 3 ){?>
		<td align="center"> 
			<div   class= "div_list_image"  >			
				<img class="img_list"  onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')" id="img_small_<?php echo $item -> id ?>" src="<?php echo base_url('/assets/image/aodai/'.($item -> id %10)."/".$item->image); ?>"></img>
				
				<div><?php  echo preg_replace("/^(\d+)(\d\d\d)/i", "$1,$2", $item -> price);  ?> <span class="money">VNĐ</span></div>
				<div style="margin-bottom:5px;"><span class="button" onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')"><?php echo lang('view_detail')?></span><span class="button" onclick="redirect_page('<?php echo base_url('user/giohang')."?ma_aodai=" . $item->id ."&giatien=".$item->price?>')" ><?php echo lang('buy')?></span></div>
				<div style="padding-left:40px;"><fb:like href="<?php echo base_url('product/view/').$item -> id ?>" layout='button_count' send='false' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like></div>
			</div>
			<?php $index = 1 ;?>
		</td>
	</tr>
	<?php }else{?>
		<td align="center"> 
			<div   class= "div_list_image"  >			
				<img class="img_list"  onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')" id="img_small_<?php echo $item -> id ?>" src="<?php echo base_url('/assets/image/aodai/'.($item -> id %10)."/".$item->image); ?>"></img>
				<div><?php  echo preg_replace("/^(\d+)(\d\d\d)/i", "$1,$2", $item -> price);  ?> <span class="money">VNĐ</span></div>
				<div style="margin-bottom:5px;"><span class="button" onclick="redirect_page('<?php echo base_url('product/view/').$item -> id ?>')"><?php echo lang('view_detail')?></span><span class="button" onclick="redirect_page('<?php echo base_url('user/giohang')."?ma_aodai=" . $item->id ."&giatien=".$item->price?>')" ><?php echo lang('buy')?></span></div>
				<div style="padding-left:40px;"><fb:like href="<?php echo base_url('product/view/').$item -> id ?>" layout='button_count' send='false' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like></div>
			</div>
		</td>
		<?php $index = $index + 1 ;?>
	<?php }?>
<?php }?>
</table>

<div id="str_paging" ><?php echo $str_paging ; ?></div>
<?php include('common/footer.php') ?>

